home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 13
/
AMIGAplus Sonderheft 13 (1998)(ICP)(DE)[!].iso
/
rexx
/
sortblk.bed
< prev
next >
Wrap
Text File
|
1997-12-03
|
1KB
|
68 lines
/*
** $VER: SortBlk.bed 1.0 (03.01.96)
**
** Sort the currently selected block, or the whole document if no block
** is selected.
**
** Written by Gerald R. Duprey Jr
** Modified by Martin Taillefer
** Modified by Marco Negri
*/
OPTIONS RESULTS
SetDisplayLock ON
SetInputLock ON
GetBlkInfo
PARSE VAR RESULT mode .
TaskID = Pragma('ID')
SetStatusBar "Sorting..."
IF mode = ON THEN DO
SaveClip QUIET NOICON NOBACKUP 'T:OldClip-' || TaskID
CutBlk
SaveClip QUIET NOICON NOBACKUP 'T:SortBlk_pre-' || TaskID
ADDRESS COMMAND 'C:Sort T:SortBlk_pre-' || TaskID || ' T:SortBlk_post-' || TaskID
OpenClip "T:SortBlk_post-" || TaskID
MarkBlk
PasteClip
OpenClip 'T:OldClip-' || TaskID
END; ELSE DO
GetCursorPos
PARSE VAR RESULT y x .
GetFilePath
path = RESULT
SaveFileAs QUIET NOICON NOBACKUP 'T:SortBlk_pre-' || TaskID
ADDRESS COMMAND 'C:Sort T:SortBlk_pre-' || TaskID || ' T:SortBlk_post-' || TaskID
OpenFile QUIET 'T:SortBlk_post-' || TaskID
SetFilePath path
Insert '" "' /* cause the modified flag to be set */
MoveLeft
Delete
Move y x
END
IF ~Show(L,'rexxsupport.library') THEN DO
AddLib('rexxsupport.library',0,-30)
END;
Delete("T:SortBlk_pre-" || TaskID)
Delete("T:SortBlk_post-" || TaskID)
Delete("T:OldClip-" || TaskID)
SetDisplayLock OFF
SetInputLock OFF